<template>
    <div>
      <h1>{{ pageName }}</h1>
      <component :is="getPageComponent(pageName)" />
    </div>
  </template>
  
  <script>
  import About from './about.vue'
  import Index from './index.vue'
  import Login from './login.vue'
  import Meeting from './meeting.vue'
  import PartnerRecruitment from './partnerRecruitment.vue'
  import Publisher from './publisher.vue'
  import PublisherApply from './publisherapply.vue'
  import Registered from './registered.vue'
  import Success from './success.vue'
  
  export default {
    props: ['pageName'],
  
    methods: {
      getPageComponent(pageName) {
        switch (pageName) {
          case 'about':
            return About
          case 'index':
            return Index
          case 'login':
            return Login
          case 'meeting':
            return Meeting
          case 'partnerRecruitment':
            return PartnerRecruitment
          case 'publisher':
            return Publisher
          case 'publisherapply':
            return PublisherApply
          case 'registered':
            return Registered
          case 'success':
            return Success
        }
      }
    }
  }
  </script>
  